/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import ejb.*;
import javax.ejb.EJB;
import javax.ejb.Stateful;
import javax.ejb.LocalBean;

/**
 *
 * @author SBelonozko
 */
@Stateful
@LocalBean
public class ServerManager {
    @EJB
    private MessageManager sendingMail;
    @EJB
    private ProductManager productManager;
    @EJB
    private ReportManager reportManager;
    @EJB
    private RequestManager requestManager;
    @EJB
    private Security security;
    


    protected ServerManager() {
        //requestManager.init(this);
        //this.security.init(this);
    }

    public ProductManager getProductManager() {
        productManager.init(this);
        return productManager;
    }

    public ReportManager getReportManager() {
        reportManager.init(this);
        return reportManager;
    }

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

    public Security getSecurity() {
        return security;
    }
    
    public RequestManager getRequestManager() {
        requestManager.init(this);
        return requestManager;
    }

    MessageManager getSendingMail() {
        sendingMail.init(this);
        return sendingMail;
    }
    
}
